// --------------------------------------------------------------------------------------------------------------------
// <copyright file="StepFaultException.cs" company="">
//   
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace ExecutionTool.Common
{
    using System;

    public class StepFaultException : Exception
    {
        #region Constructors and Destructors

        public StepFaultException(string message, StepType stepType, int errorCode, Exception innerException = null)
            : base(message, innerException)
        {
            this.StepType = stepType;
            this.ErrorCode = errorCode;
        }

        #endregion

        #region Public Properties

        public int ErrorCode { get; private set; }

        public StepType StepType { get; private set; }

        #endregion

        #region Public Methods and Operators

        public override string ToString()
        {
            return string.Format("Step Type [{0}]:Error Code [{1}]:{2}", this.StepType, this.ErrorCode, base.ToString());
        }

        #endregion
    }
}
